
#ifndef TEST_FUNCTION_DEFINE
#define TEST_FUNCTION_DEFINE

#include "math/vec_operation.hpp"
#include "texture/image_write.hpp"
#include <string_view>

#ifndef OUTPUT_DIR
#error There is no output dir path define
#endif

template <ui32 tw, ui32 th>
static void TEST_CASE( std::string_view name,
                typename image_writer<tw, th, true>::generateFunc functor ) {
  std::cout << "---------Current Test: " << name << "----------" << '\n';
  TEST_IMAGE<tw, th>( ( std::string( OUTPUT_DIR ) + std::string(name) + ".png" ).c_str(),
                      functor );
}

template <ui32 w, ui32 h>
static void TEST_IMAGE( const char *fileName,
                 const typename image_writer<w, h, true>::generateFunc &func ) {
  image_writer<w, h, true> writer( fileName, func );
  writer.excuteAndSave();
}

#endif